//package com.will.network;
//
//import com.android.volley.toolbox.HurlStack;
//import com.squareup.okhttp.OkHttpClient;
//import com.squareup.okhttp.OkUrlFactory;
//
//import java.io.IOException;
//import java.net.HttpURLConnection;
//import java.net.URL;
//
//import javax.net.ssl.HostnameVerifier;
//import javax.net.ssl.SSLSession;
//
///**
// * An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
// * uses OkHttp as its transport.
// */
//public class OkHttpStack extends HurlStack {
//    private final OkUrlFactory mFactory;
//
//    public OkHttpStack() {
//        this(new OkHttpClient());
//    }
//
//    public OkHttpStack(OkHttpClient client) {
//        if (client == null) {
//            throw new NullPointerException("Client must not be null.");
//        }
//        client.setSslSocketFactory(FakeX509TrustManager.getSSLSocketFactory());
//        client.setHostnameVerifier(new HostnameVerifier() {
//            @Override
//            public boolean verify(String hostname, SSLSession session) {
//                return true;
//            }
//        });
//        mFactory = new OkUrlFactory(client);
//    }
//
//    @Override
//    protected HttpURLConnection createConnection(URL url) throws IOException {
//        return mFactory.open(url);
//    }
//}
